package com.jmp.feign;

import one.stand.fallback.WechatServiceFallBack;
import one.stand.model.ResultModel;
import one.stand.request.ComponentProgramRequest;
import one.stand.request.ComponentVerifyTicketRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Administrator
 */
@Component
@FeignClient(value = "wechat-service", fallback = WechatServiceFallBack.class, decode404 = true)
public interface WechatServiceFegin {
    @GetMapping("wx/addTemplate")
    ResultModel addTemplate(@RequestParam("appId") String appId);

    @PostMapping("wx/wxcallback")
    String wxcallback(@RequestBody ComponentVerifyTicketRequest request);

    @PostMapping("wx/program")
    String program(@RequestBody ComponentProgramRequest request);
}
